<?php
namespace app\assets;

use yii\web\AssetBundle;

/**
 * 日历组件
 *
 * Class CalendarAsset
 * @package app\assets
 */
class CalendarAsset extends AssetBundle
{
    public $sourcePath = '@app/themes/basic/assets';
    public $css = [
        'js/calendar/date.css',
    ];
    public $js = [
        'js/calendar/calendar.js',
        'js/calendar/calendar-zh.js',
        'js/calendar/calendar-setup.js',
    ];
    public $depends = [
        'yii\web\JqueryAsset'
    ];

    /**
     * @inheritdoc
     */
    public static function register($view)
    {
        $view->registerJs('var calendar_base_path = "/jslib/calendar/";', 1);
        $view->registerCss('.calendar {float:none;} .calendar  table, .calendar tr,.calendar td{float:none;}');
        return parent::register($view);
    }
}
